var app = getApp(),that;
Page({
  data: {
    ckkc: {},
    currentCard: {},
    memberId: {},
  },
  onLoad: function(o) {
    console.log(o)
    this.setData({
      currentCard: o.item,
      memberId: wx.getStorageSync('bizUserInfo').id
    })
  },
  onReady: function() {},
  onShow: function() {
    var that=this;
    app.getData({
      url: app.api.getCkkc(that.data.memberId, that.data.currentCard),
      method: 'GET',
      ok: function(res) {
        console.log(res)
        if (res.statusCode == 200 && res.errMsg == 'request:ok') {
          if (res.data.code == 1) {
            that.setData({
              ckkc: res.data.data,
            })
          } else {
            wx.showToast({
              title: res.data.message,
            })
          }
        }
      }

    })
  },
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {},
  onReachBottom: function() {},
  onShareAppMessage: function() {}
});